package com.xhwl.logistics.converter.mapstruct.logistics;

import com.xhwl.common.dto.cent.business.StaffDTO;
import com.xhwl.logistics.entity.approval.ApprovalNodeUser;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ApprovalNodeUserConverter {

    ApprovalNodeUserConverter INSTANCE = Mappers.getMapper(ApprovalNodeUserConverter.class);

    ApprovalNodeUser toPoConvert(StaffDTO source);

    StaffDTO toVoConvert(ApprovalNodeUser po);

    @IterableMapping(elementTargetType = ApprovalNodeUser.class)
    List<ApprovalNodeUser> toPoConvertList(List<StaffDTO> source);

    @IterableMapping(elementTargetType = StaffDTO.class)
    List<StaffDTO> toVoConvertList(List<ApprovalNodeUser> source);
}
